package com.xmy.cultivate.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * <p>
 * 教材
 * </p>
 *
 * @author hpiggy
 * @since 2024-08-07
 */
@TableName("course_textbook")
@ApiModel(value = "CourseTextbook对象", description = "教材")
@Data
public class CourseTextbook implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;

    @ApiModelProperty("教材名")
    private String name;

    @ApiModelProperty("年份")
    private Integer yearPart;

    @ApiModelProperty("学期")
    private Integer quarterNum;

    @ApiModelProperty("年级")
    private Integer yearClassId;

    @TableField(exist = false)
    private String yearClassName;

    @ApiModelProperty("班型")
    private Long classTypeId;

    @TableField(exist = false)
    private String classTypeName;

    private Long subjectsId;

    private Integer lessonType;


    @TableField(fill = FieldFill.INSERT)
    private Long createdId;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedAt;

    @TableLogic
    private Integer deleted;
}
